package com.shenjies88.practice.designpatterns;

import com.shenjies88.practice.designpatterns.imp.PlugAImpl;
import com.shenjies88.practice.designpatterns.interfaces.PlugA;

public class ClientTest {

    public static void main(String[] args) {
        System.out.println("===1.手机不使用转接头充电===");
        MobilePhone mobilePhone = new MobilePhone();
        mobilePhone.chargeFromPlugA(new PlugAImpl());
        System.out.println("===2.手机使用转接头B转到A充电[类适配器模式]===");
        PlugA plugA = new PlugAAdapterPlugB();
        mobilePhone.chargeFromPlugA(plugA);
    }
}
